<!DOCTYPE html>
<html>
<head>
<title>代码生成器</title>
<#include "/header.html" />
</head>
<body>
<div id="rrapp">
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.tableName" @keyup.enter="query" placeholder="表名">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<!--<a class="btn btn-primary" @click="generator"><i class="fa fa-file-code-o"></i>&nbsp;生成代码</a>-->
			<a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;生成代码</a>
			<a class="btn btn-primary" @click="clearCache"><i class="fa fa-plus"></i>&nbsp;清除缓存</a>
		</div>
		<table id="jqGrid"></table>
		<div id="jqGridPager"></div>
	</div>
	<div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label">表名</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="gen.tableName" placeholder="表名" readonly="readonly"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">模块名称</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="gen.module" placeholder="模块名称"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">作者</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="gen.author" placeholder="作者"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="generator" value="生成"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<script src="${request.contextPath}/statics/js/modules/gen/generator.js?_${.now?long}"></script>
</body>
</html>